var Interface = {
	defaultGeoCode : '110000',
	jsonRequest : function(config,requestData, callback,showLoading) {
		if(showLoading){
			var loadingDialog=$('<div id="loadingDialog" style="text-align: center; padding: 35px;font-size:12px;" title="加载中......">'+
				'<img src="images/custom/loading.gif" />'+
				'</div>');
				if($("#loadingDialog").length==0){
					$("#WidgetContainer").append(loadingDialog);
					$("#loadingDialog").dialog({
						width : 300,
						autoOpen : true,
						resizable : false,
						draggable : true,
						modal : true,
						position : ['center']
					});
				}else{
					$("#loadingDialog").dialog('open');
				}
				
		}
		$.ajax({
			url : config.localProxyUrl + "?" + config.ServerUrl,
			type : 'GET',
			data : requestData,
			dataType : 'html',//json
			success : function(response, status, request) {
				$("#loadingDialog").dialog('close');
				var start=response.indexOf("{");
				var data=response.substr(start);
				var json=eval('('+data+')');
				callback(json, data, status, request);
			},
			error : function(e) {
				$("#loadingDialog").dialog('close');
				Utils.alert('获取数据失败，请联系管理员!', '错误');
			}
		});
	},
	jsonRequest2 : function(config,requestData, callback,showLoading) {
		if(showLoading){
			var loadingDialog=$('<div id="loadingDialog" style="text-align: center; padding: 35px;font-size:12px;" title="加载中......">'+
				'<img src="images/custom/loading.gif" />'+
				'</div>');
				if($("#loadingDialog").length==0){
					$("#WidgetContainer").append(loadingDialog);
					$("#loadingDialog").dialog({
						width : 300,
						autoOpen : true,
						resizable : false,
						draggable : true,
						modal : true,
						position : ['center']
					});
				}else{
					$("#loadingDialog").dialog('open');
				}
				
		}
		$.ajax({
			url : config.localProxyUrl + "?" + config.ServerUrl,
			type : 'GET',
			data : requestData,
			dataType : 'html',//json
			success : function(response, status, request) {
				$("#loadingDialog").dialog('close');
				var json=eval('('+response+')');
				callback(json, response, status, request);
			},
			error : function(e) {
				$("#loadingDialog").dialog('close');
				Utils.alert('获取数据失败，请联系管理员!', '错误');
			}
		});
	},
	jsonRequest3 : function(config,requestData, callback,showLoading) {
		if(showLoading){
			var loadingDialog=$('<div id="loadingDialog" style="text-align: center; padding: 35px;font-size:12px;" title="加载中......">'+
				'<img src="images/custom/loading.gif" />'+
				'</div>');
				if($("#loadingDialog").length==0){
					$("#WidgetContainer").append(loadingDialog);
					$("#loadingDialog").dialog({
						width : 300,
						autoOpen : true,
						resizable : false,
						draggable : true,
						modal : true,
						position : ['center']
					});
				}else{
					$("#loadingDialog").dialog('open');
				}
				
		}
		$.ajax({
			url : config.localProxyUrl + "?" + config.ServerUrl,
			type : 'GET',
			data : requestData,
			dataType : 'html',//json
			success : function(response, status, request) {
				$("#loadingDialog").dialog('close');
				var json=eval('('+response+')');
				callback(json, response, status, request);
			},
			error : function(e) {
				$("#loadingDialog").dialog('close');
				Utils.alert('获取数据失败，请联系管理员!', '错误');
			}
		});
	}
}